package zipcode;

import java.sql.SQLException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import java.util.ArrayList;
import common.misc.StringMisc;

public class ZipcodeFindCommand implements ZipcodeCommand{

	public void execute(HttpServletRequest request, HttpServletResponse response)
			throws ZipcodeException, SQLException {
		
		ArrayList list = new ArrayList();
		System.out.println("-ZipcodeFindCommand start-");		//

		String dong = StringMisc.fixNull(request.getParameter("dong"));
		
		ZipcodeControl control = new ZipcodeControl();
		
		list = control.getZipList(dong);
			
		request.setAttribute("zipcodelist", list);
		System.out.println("-ZipcodeFindCommand end-");		//
	}

}
